<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <nav class="navbar navbar-expand-lg main-navbar" id="navbar">
    <form class="form-inline mr-auto">
        <ul class="navbar-nav mr-3">
            <li th:if="${currUri != 'user-info' and currUri != 'update-user-info' and currUri != 'edit-article'}">
                <a  href="#" data-toggle="sidebar" class="nav-link nav-link-lg">
                    <i class="ion ion-navicon-round"></i>
                </a>
            </li>
        </ul>
    </form>
    <ul class="navbar-nav navbar-right">
        <li class="dropdown"><a href="#" data-toggle="dropdown" class="nav-link dropdown-toggle nav-link-lg">
            <i class="ion ion-android-person d-lg-none"></i>
            <div class="d-sm-none d-lg-inline-block">你好，[[${session.loginUser.userName}]]</div>
        </a>
            <div class="dropdown-menu dropdown-menu-right">
                <a href="index.html" class="dropdown-item has-icon">
                    <i class="ion ion-flag"></i> 社区主页
                </a>
                <a href="ProfilePage" class="dropdown-item has-icon">
                    <i class="ion ion-home"></i> 我的空间
                </a>
                <a href="logout" th:href="@{/logout}" class="dropdown-item has-icon">
                    <i class="ion ion-log-out"></i> 退出登录
                </a>
            </div>
        </li>
    </ul>
</nav>

    <div class="main-sidebar" id="sidebar">
    <aside id="sidebar-wrapper">
        <div class="sidebar-brand">
            <a href="index.html">后台管理</a>
        </div>
        <div class="sidebar-user">
            <div class="sidebar-user-picture">
                <a href="user-info"><img style="width: 50px;height: 50px" alt="image" th:src="${session.loginUser.imagePath}" src="u-admin/dist/img/avatar/avatar-1.jpeg"></a>
            </div>
            <div class="sidebar-user-details">
                <div class="user-name" th:text="${session.loginUser.userName}">莫提</div>
                <div class="user-role">
                    普通用户
                </div>
            </div>
        </div>
        <ul class="sidebar-menu">
            <li class="menu-header">仪表盘</li>
            <li th:class="${currUri=='index'?'active':''}">
                <a href="user-admin"><i class="ion ion-speedometer"></i><span>仪表盘</span></a>
            </li>

            <li class="menu-header">其他管理</li>
            <li th:class="${currUri=='user-info' or currUri == 'update-user-info' ?'active':''}">
                <a href="user-info"><i class="ion ion-android-person"></i><span>个人信息</span></a>
            </li>
            <li th:class="${currUri=='file-store'?'active':''}">
                <a href="file-store"><i class="ion ion-ios-cloud"></i> 我的网盘</a>
            </li>
            <li th:class="${currUri=='messages'?'active':''}">
                <a href="messages"><i class="ion ion-chatbox-working"></i><span>消息中心 <div class="badge badge-primary" th:if="${newMessageCount > 0}" th:text="${newMessageCount}"></div></span></a>
            </li>
            <li th:class="${currUri=='published-articles' or currUri=='draft-articles' or currUri == 'edit-article' or currUri == 'new-article'
             or currUri == 'kinds-and-tags' or currUri == 'search-articles' or currUri=='trash-articles'
             ?'active':''}">
                <a href="#" class="has-dropdown"><i class="ion ion-ios-book"></i><span>文章管理</span></a>
                <ul class="menu-dropdown">
                    <li th:class="${currUri=='published-articles' or currUri=='draft-articles' or currUri == 'search-articles' or currUri=='trash-articles' ?'active':''}" ><a href="all-published-articles?current=1"><i class="ion ion-ios-circle-outline"></i> 所有文章</a></li>
                    <li th:class="${currUri=='new-article' or currUri == 'edit-article'?'active':''}" ><a href="publish-article"><i class="ion ion-ios-circle-outline"></i> 新文章</a></li>
                    <li th:class="${currUri == 'kinds-and-tags'?'active':''}"><a href="article-kinds-tags"><i class="ion ion-ios-circle-outline"></i> 分类目录和标签</a></li>
                </ul>
            </li>
            <li>
                <a href="#" class="has-dropdown"><i class="ion ion-tshirt"></i><span>外观管理</span></a>
                <ul class="menu-dropdown">
                    <li><a href="#"><i class="ion ion-ios-circle-outline"></i> 主题</a></li>
                    <li><a href="#"><i class="ion ion-ios-circle-outline"></i> 友情链接</a></li>
                </ul>
            </li>

            <div class="p-3 mt-4 mb-4">
                <a  th:href="@{/logout}" href="#" class="btn btn-danger btn-shadow btn-round has-icon has-icon-nofloat btn-block">
                    <i class="ion ion-log-out"></i>
                    <div>退出登录</div>
                </a>
            </div>
        </ul>
    </aside>
</div>

    <footer class="main-footer" id="footer">
        <div class="footer-left">
            Copyright &copy; 2020 <div class="bullet"></div> 版权所有 Molihub社区 <div class="bullet"></div> 备案号: <a href="http://www.beian.miit.gov.cn/">冀ICP备19025674号-2</a>
        </div>
        <div class="footer-right"></div>
    </footer>
</body>
</html>